import 'package:flutter/material.dart';
import 'package:local_coffee/components/c_appbar/custom_appbar.dart';
import 'package:local_coffee/components/c_button/index.dart';
import 'package:local_coffee/components/hex.dart';
import 'package:local_coffee/components/rgba.dart';
import 'package:local_coffee/pages/order/widgets/remark_row.dart';
import 'package:local_coffee/routes/index.dart';
import 'package:local_coffee/utils/global.dart';

class OrderRemark extends StatefulWidget {
  
  OrderRemark({
    Key key
  }) : super(key: key);

  @override
  _OrderRemarkState createState() => _OrderRemarkState();
}

class _OrderRemarkState extends State<OrderRemark> {
  
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: customAppBar(
        title: '订单备注',
        context: context
      ),
      body: SingleChildScrollView(
        child: Container(
          color: HEX.hexfff,
          child: Column(
            children: <Widget>[
              Container(
                padding: EdgeInsets.symmetric(horizontal: 15),
                child: Column(
                  children: <Widget>[
                    RemarkRow('纸巾'),
                    RemarkRow('奶包'),
                    RemarkRow('糖包', borderBottom:  false),
                  ],
                ),
              ),
              // 输入框
              Container(
                margin: EdgeInsets.only(top: 10, bottom: 20),
                padding: EdgeInsets.symmetric(horizontal: 15),
                child: Row(
                  children: <Widget>[
                    Expanded(
                      child: TextField(
                        maxLength: 5,
                        keyboardType: TextInputType.multiline,
                        decoration: InputDecoration(
                          filled: true,
                          focusColor: RGBA.rgbaf8f8f8,
                          counterText: '',
                          border: OutlineInputBorder(
                            borderSide: BorderSide.none,
                            borderRadius: BorderRadius.all(Radius.circular(4.0))
                          ),
                          contentPadding: EdgeInsets.all(10),
                          hintText: '请输入评价内容',
                          hintStyle: TextStyle(
                            color: RGBA.rgbaa6a6a6,
                            fontSize: 14
                          ),
                          fillColor: RGBA.rgbaf8f8f8
                        ),
                      ),
                    )
                  ],
                ),
              ),
              Container(
                child: CButton.normal(
                  width: 300,
                  child: Text('确认'),
                  color: HEX.hexfff,
                  bgColor: RGBA.rgba94c4ec,
                  onPressed: () => G.pushNamed(N.orderConfirm)
                ),
              )
            ],
          ),
        ),
      ),
    );
  }

}